Determine the distance between two points